package homework;
class Animal2 {
	String name;
	public Animal2(String name) {
		this.name=name;
		System.out.println("Animal2构造方法");//1
	}
	static {
		System.out.println("Animal的静态代码块");//2
	}
	{
		System.out.println("Animal的实例代码块");//3
	}
}
class Dog2 extends Animal2 {
	String name;
	public Dog2 (String name) {
		super(name);
		System.out.println("Dog2的构造方法");//4
	}
	static {
		System.out.println("Dog2的静态代码块");//5
	}
	{
		System.out.println("Dog2的实例代码块");//6
	}
}
public class test7 {
	public static void main(String[] args) {
		Dog2 dog=new Dog2("小狗");
		System.out.println("----------");
		Dog2 dog1=new Dog2("小狗");
		final int [] array={1,2,3,4,5};
		array[0]=99;
	}
}
